<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
      <button id="btn">点我创建一个输入框</button>
      <script type="text/javascript">
        const btn = document.getElementById('btn')
        btn.onclick = ()=>{
          const input = document.createElement('input')
          document.body.appendChild(input)
          input.focus()
        }
      </script>
</body>
</html>